include "./mindmap-topic.asy";
include "./mindmap-basiclayout.asy";



struct MindMap {
  Topic root;

  void operator init(object subject ... Topic topics[]) {
    this.root=Topic(subject ... topics);
  }
  
}

MindMap MindMap(string content ... Topic topics[]) {
  return MindMap(Label(baseline(content),basealign) ... topics);
}


// Other layout algorithms should define such a function
void layout(MindMap m, BasicLayout layouter = clockwiselayout) {
  layouter.place(m.root);
}


void out(picture dest=currentpicture, MindMap m) {
  m.root.out(dest);
}
